# Needs to be above WSGIScriptAlias /
# @TODO With this configuration it needs to be accessed via [1] instead of [2]
# [1] http://127.0.0.1:8080/module-build-service/module-build-service/1/module-builds/
# [2] http://127.0.0.1:8080/module-build-service/1/module-builds/

WSGIDaemonProcess module-build-service user=mbs group=mbs threads=15 display-name=module-build-service
WSGIScriptAlias /module-build-service /opt/module-build-service/mbs.wsgi
<Location /module-build-service>
    Require host localhost
    WSGIProcessGroup module-build-service
</Location>

<Directory /opt/module-build-service>
    WSGIApplicationGroup %{GLOBAL}
    Require all granted
</Directory>

RewriteEngine On
RewriteRule ^/module/(.*)$ /module-build-service/module-build-service/$1 [PT]
